package com.itheima01;

public class 方法的重载 {

    public static void main(String[] args) {

        int sum1 = getSum(10,20);

        int sum2 = getSum(10,20,30);

        double sum3 = getSum(3.14,5.28);

        System.out.println(sum1);
        System.out.println(sum2);
        System.out.println(sum3);

    }

    public static int getSum(int a, int b) {
        int c = a + b;
        return c;
    }

    public static int getSum(int a, int b, int c) {
        int d = a + b + c;
        return d;
    }


    public static double getSum(double a, double b) {
        double c = a + b;
        return c;
    }
}
